﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Frame.Lib.Core.Attach;
using Frame.Lib.Utilities;


public partial class Project_Attach_Add : System.Web.UI.Page
{
    private string TaskID
    {
        get
        {
            return Request["TaskID"];
        }
    }
    private string PrjID
    {
        get
        {
            return Request["PrjID"];
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        btnSave.Attributes.Add("onclick", "showUploadMsg(" + lblMessage.ClientID + "," + filAttach.ClientID + ");");
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (filAttach.FileName != "")
        {
            AttachBO attach = new AttachBO("PrjTaskAttach");
            attach.Save(Request.Files, int.Parse(TaskID));
        }
        string script = "top.setTimeout(\"alert('上传成功')\",100);" + JSUtil.GetDelFrmString();
        JSUtil.ResponseJS(script);
    }
}
